const express = require('express');
const router = express.Router();
const addressController = require('../controllers/addressController');
const { authenticate } = require('../middleware/auth');

router.post('/', authenticate, addressController.addAddress);
router.get('/default', authenticate, addressController.getDefaultAddress);
router.put('/:id', authenticate, addressController.updateAddress);
router.delete('/:id', authenticate, addressController.deleteAddress);
router.get('/', authenticate, addressController.getAddresses);
router.get('/:id', authenticate, addressController.getAddress);
router.put('/:id/default', authenticate, addressController.setDefaultAddress);


module.exports = router;